import request from "@/utils/request"

//列表查询
export const queryAllApi = () => request.get("/depts")


// 新增部门信息
export const addApi = (dept) => request.post('/depts',dept)


// 编辑部门信息
// 1.根据id查询部门信息
export const queryByIdApi = (id) => request.get(`/depts/${id}`)

// 2.编辑信息
export const updateApi = (dept) => request.put('/depts',dept)


// 删除数据
export const deleteApi = (id) => request.delete(`/depts?id=${id}`,id)



